package beans.impl;

import beans.Product;
import java.io.Serializable;
//import javax.persistence.Entity;
import java.util.ArrayList;
//import javax.persistence.Table;

/**
 * Produit
 * @author M2 MIAGE Apprentissage - Groupe 3 (JPastor)
 */
public class ProductBean implements Serializable, Product{

    /**
     * Reference produit
     */
    private String reference;

    /**
     * Nom du produit
     */
    private String name;

    /**
     * Prix du produit
     */
    private double price;

    private ArrayList<Integer> productStoreList;

    public ProductBean() {}

    public ProductBean(String reference, String name, double price, ArrayList<Integer> productStoreList) {
        this.reference = reference;
        this.name = name;
        this.price = price;
        this.productStoreList = productStoreList;
    }

    public String getReference() {
        return reference;
    }
    public void setReference(String reference) {
        this.reference = reference;
    }

    public String getName() {
        return name;
    }

    public double getPrice() {
       return price;
    }

    private void addStore(int storeId) {
        this.productStoreList.add(storeId);
    }

    public ArrayList<Integer> getProductStoreList() {
        return productStoreList;
    }
}
